package com.bnz.manager.controller;

import com.bnz.common.entity.R;
import com.bnz.manager.service.SentinelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sentinel")
public class SentinelController {
    @Autowired
    private SentinelService sentinelService;

    // 1. 获取资源的第一种方式
    @GetMapping("/rest1")
    public R rest1(){
       String rest1 = sentinelService.getRest();
       return R.ok().put("msg",rest1);
    }
    // 2. 获取资源的第二种方式
    @GetMapping("/rest2")
    public R rest2(){
        String rest2 = sentinelService.getRest2();
        return R.ok().put("msg",rest2);
    }
    // 2. 获取资源的第二种方式
    @GetMapping("/rest3")
    public R rest3(){
        String rest3 = sentinelService.getRest3();
        return R.ok().put("msg",rest3);
    }
}
